import java.util.ArrayList;


public class player {
	
	//variables
	public String name;
	ArrayList<card> hand;
	private int score;
	public boolean playerstayed;
	
	//constructor
	public player(String name){
		this.name=name;
		hand=new ArrayList<card>();
		this.score=0;
		this.playerstayed=false;
	}
	
	//methods
	
	//get name
	public String getName(){
		
		return name;
	}
	
	//get score
	public int getScore(){
		
		
		return score;
	}
	//hit
	public void hitCard(card c){
		hand.add(c);
		score+=c.getValue();
		
	}
	
	
	public String toString(){
		
		String temp = "";
		for(int i=0; i<hand.size(); i++){
			
			temp+=hand.get(i).toString();
		}
		return temp;
	}
	
}
